/**
 * @ClassName LC3000
 * @Author ykx
 * @Date 2024/7/13 8:35
 * @Version 1.0
 */
public class LC3000 {
    public static void main(String[] args) {

    }

    public int areaOfMaxDiagonal(int[][] dimensions) {
        int maxDiagonal = 0;
        int index = 0;
        int maxArea = 0;
        for (int i = 0; i < dimensions.length; i++) {
            int diagonal = dimensions[i][0] * dimensions[i][0] + dimensions[i][1] * dimensions[i][1];
            if (diagonal >= maxDiagonal) {
                maxArea = diagonal == maxDiagonal ? Math.max(maxArea, dimensions[i][0] * dimensions[i][1]) : dimensions[i][0] * dimensions[i][1];
                maxDiagonal = diagonal;
                index = i;

            }
        }
        return maxArea;
    }

}
